package com.mydemo.admin.config;

import org.springframework.boot.ApplicationRunner;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.sql.DataSource;
import java.sql.Connection;

/**
 * DataSource配置
 * @author Last_Island
 * @version 1.0
 */
@Configuration
public class DataSourceConfig {
    @Bean
    public ApplicationRunner runner(DataSource dataSource) {
        return args -> {
            Connection connection = dataSource.getConnection();
        };
    }

}
